from enum import Flag, IntEnum, auto, Enum

# 房屋状态
class HouseState(IntEnum):
    SALE = 15701
    RESERVE = auto()
    RECORD = auto()
    SIGN = auto()
    LEASE = auto()
    NOT_SALE = 15707
    RESERVE2 = 15709
    SEAL_UP = 15710
    FROZEN = auto()
    MORTGAGE_CAN_SIGN = auto()
    MORTGAGE_NOT_SIGN = auto()

class CrawlerType(Enum):
    NEW_HOUSE = "new_house"
    SECOND_HOUSE = "second_house"
    LAND = "land"

class DateRangeType(Flag):
    MONTHLY = 0
    QUARTER = 1
    ANNUAL = 2

class ProjectType(Enum):
    # 住宅
    HOUSE = 17101
    # 其他
    OTHER = auto()
    # 办公
    OFFICE = auto()
    # 商业
    COMMERCIAL_BUILDING = auto()
    # 公寓
    INDUSTRIAL = auto()
    # 所有
    ALL = "all"


class RoomUseType(IntEnum):
    # 住宅
    HOUSE = -1
    # 其他
    OTHER = -2
    # 办公
    OFFICE = -3
    # 商业
    COMMERCIAL_BUILDING = -4
    # 公寓
    INDUSTRIAL = -5
    # 全选
    ALL = -6

class RoomState(Flag):
    # 全选
    ALL = -5
    # 可售
    WAITING_FOR_SALE = -4
    # 已售
    SOLD = -3
    # 不已售
    NOT_SOLD = -2
    # 退房
    CHECK_OUT = -1

class SaleMethod(Enum):
    SALE_METHOD_ONE = "挂牌"
    SALE_METHOD_TWO = "拍卖"
    SALE_METHOD_THREE = "招标"

class TransactionStatus(Enum):
    TRANSACTION_STATUS_ONE = "未上市"
    TRANSACTION_STATUS_TWO = "正在交易"
    TRANSACTION_STATUS_THREE = "已成交"
    TRANSACTION_STATUS_FOUR = "流标"
    TRANSACTION_STATUS_FIVE = "已终止"
    TRANSACTION_STATUS_SIX = "政府收回"
    TRANSACTION_STATUS_SEVEN = "撤牌"

if __name__ == '__main__':
    print(ProjectType.OTHER.value)
    print(ProjectType.ALL.value)
    print(HouseState.MORTGAGE_CAN_SIGN.value)
    print(HouseState.MORTGAGE_NOT_SIGN.value)